import request from '@/utils/request'
export const findUpDiary = (search) => 
    request({
        url: '/upDiary',
        method: 'get',
        params: {
            offset: search.offset,
            limit: search.limit,
            diaryPerson: search.diaryPerson
        }
    })
export const removeDiray = (id) => 
    request({
        url: '/upDiary/' + id,
        method: 'delete'
    })
export const getDiary = (id) =>
    request({
        url: '/upDiary/' + id,
        method: 'get'
    })

export const updateDiary = (followupdiary) =>
    request({
        url: '/upDiary',
        method: 'put',
        data: followupdiary
    })
    
export const saveDiary = (followupdiary) => 
request({
    url: '/upDiary',
    method: 'post',
    data: followupdiary        
})